$(function () {
    var layer = layui.layer;
    var form = layui.form;
    //----------------------------------------------------------------
    // 调用渲染列表信息的函数
    initDeviceList();
    //------------------------------------------------------------------------------
    // 获取所有室友
    function initDeviceList() {
        // var name = window.parent.$('#name').val()
        var sno = window.parent.$('#sno').val()
        // console.log(name);
        console.log(sno);
        $.ajax({
            method: 'GET',
            url: '/my/info/myHostel/' + sno,
            success: function (res) {
                // console.log(res);
                var htmStr = template('tpl-table', res);
                $('tbody').html(htmStr)
            }
        })
    }
})